package com.carl.zlds.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.carl.zlds.dao.sqlprovider.AdSqlProvider;
import com.carl.zlds.dao.sqlprovider.ArticleSqlProvider;
import com.carl.zlds.model.Ad;
import com.carl.zlds.pojo.dto.AdSearchDTO;
import com.carl.zlds.pojo.vo.AdVO;
import com.carl.zlds.pojo.vo.ArticleVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;

/**
 * @author carl
 */
public interface AdMapper extends BaseMapper<Ad> {
    @SelectProvider(type = AdSqlProvider.class, method = "getAdList")
    List<AdVO> getAdList(@Param("dto") AdSearchDTO dto, @Param("limitSql") String limitSql);

    @SelectProvider(type = AdSqlProvider.class, method = "getAdList")
    Integer countAdList(@Param("dto") AdSearchDTO dto, @Param("limitSql") String limitSql);

    @SelectProvider(type = AdSqlProvider.class, method = "getAdListByWeb")
    List<AdVO> getAdListByWeb(@Param("dto") AdSearchDTO dto);
}
